<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

    <head>
        <title th:text="${pageTitle}"></title>
        <div data-th-replace="layout/head-top"></div>
    </head>

    <body class="gray-bg">
        <div class="wrapper wrapper-content animated fadeInLeft">
            <div data-th-replace="common/functionDepict"></div>
            <div>
                <div class="row">
                    <div class="pt10">
                        <input type="hidden" id="userType" th:value="${agentUser['userType']}"/>
                        <div th:class="${agentUser['userType']} == 1 ?'col-sm-7':'col-sm-12'">
                            <div class="ibox float-e-margins">
                                <div class="ibox-title">
                                    <h5>推广员详细信息</h5>
                                </div>
                                <div class="ibox-content clearfix p-t">
                                    <div class="clearfix pt10">
                                        <table class="table">
                                            <tbody>
                                            <tr>
                                                <td>
                                                    <button type="button" class="btn btn-lg btn-outline btn-success m-r-sm">
                                                        <i class="fa fa-pencil fs14" th:text="' ' + ${agentUser['agentIncome']['orderNum']}"></i>
                                                    </button>累计订单数量
                                                </td>
                                                <td>
                                                    <button type="button" class="btn btn-lg btn-outline btn-danger m-r-sm">
                                                        <i class="fa fa-yen fs14" th:text="' ' + ${agentUser['agentIncome']['incomeSumPrice']}"></i>
                                                    </button>累计收益
                                                </td>
                                                <td>
                                                    <button type="button" class="btn btn-lg btn-outline btn-info m-r-sm">
                                                        <i class="fa fa-clock-o fs14" th:text="' ' + ${agentUser['agentIncome']['cycleNum']}"></i>
                                                    </button>累计结算期数
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="form-horizontal">
                                        <div class="hr-line-dashed"></div>
                                        <input type="hidden" id="agentUserId" th:value="${agentUser['id']}"/>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">推广员名称</label>
                                            <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['agentUserName']}"></p></div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">推广员等级</label>
                                            <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['userType']} == 1?'一级':'二级'"></p></div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">手机号码</label>
                                            <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['mobile']}"></p></div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">分成方式</label>
                                            <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['divideType']}==1?'固定分成':'——'"></p></div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div th:if="${agentUser['userType']} == 1">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">一级分成比例</label>
                                                <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['oneScale']} + '%'"></p></div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">二级分成比例</label>
                                                <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['twoScale']} + '%'"></p></div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">奖励金比例</label>
                                                <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['bonusScale']} + '%'"></p></div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                        </div>
                                        <div th:if="${agentUser['userType']} == 2">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">上线推广员</label>
                                                <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['parentAgentUser']['agentUserName']}"></p></div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">分成比例</label>
                                                <div class="col-sm-10"><p class="form-control-static" th:text="${agentUser['parentAgentUser']['twoScale']} + '%'"></p></div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">结算周期</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static" th:if="${agentUser['settType']} == 1">随时结</p>
                                                <p class="form-control-static" th:if="${agentUser['settType']} == 2">月结</p>
                                                <p class="form-control-static" th:if="${agentUser['settType']} == 3">年结</p>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">提现账户</label>
                                            <div class="col-sm-10"><p class="form-control-static">提现账户</p></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div th:if="${agentUser['userType']} == 1" class="col-sm-5">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>推广员下线列表</h5>
                            </div>
                            <form id="search-form">
                                <input type="hidden" name="parentId" th:value="${agentUser['id']}"/>
                                <input type="hidden" name="userType" value="2"/>
                                <input type="hidden" name="flag" value="2"/>
                            </form>
                            <div class="ibox-content" id="sunAagentUser-list-context" style="min-height: 350px">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div data-th-replace="layout/head-footer"></div>
        <script type="text/javascript" th:src="@{{path}/admin/business/agent/user/agent-user-info.js?v={v}(path=${staticPath},v=${v})}"></script>
    </body>
</html>